home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / mx.man < prev    next >
Encoding:
Text File  |  1990-04-19  |  63.1 KB  |  1,389 lines

  1.  
  2.  
  3.  
  4. MX                        User Commands                        MX
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      mx - Mouse-oriented editor for X
  12.  
  13. SSYYNNOOPPSSIISS
  14.      mmxx [_o_p_t_i_o_n_s]  [_f_i_l_e _f_i_l_e _f_i_l_e ...]
  15.      mmxxssyynncc [_o_p_t_i_o_n_s]  [_f_i_l_e _f_i_l_e _f_i_l_e ...]
  16.  
  17. OOPPTTIIOONNSS
  18.      --bbdd _c_o_l_o_r      Use _c_o_l_o_r as the border color for the window.
  19.                     If  this  switch isn't given then the bboorrddeerr--
  20.                     CCoolloorr X default is used.  If it  isn't  given
  21.                     either, then the foreground color is used.
  22.  
  23.      --bbgg _c_o_l_o_r      Use _c_o_l_o_r as the  background  color  for  the
  24.                     window.   If this switch isn't given then the
  25.                     bbaacckkggrroouunndd X default is used.   If  it  isn't
  26.                     given  either,  or if the display is a black-
  27.                     and-white one, then White is used.
  28.  
  29.      --DD             Causes mmxx  not  to  detach  itself  from  its
  30.                     parent  process.   Useful  when  mmxx is invoke
  31.                     from programs that wait  for  it  to  finish,
  32.                     like  mail  programs.  If mmxx is invoked under
  33.                     the name mmxxssyynncc  then  mmxx  acts  as  if  this
  34.                     switch had been given.
  35.  
  36.      --ddiissppllaayy _h_o_s_t::_d_i_s_p_l_a_y
  37.                     Use _h_o_s_t and _d_i_s_p_l_a_y as an indication of  the  |
  38.                     display  on  which  to  open the window.  The  |
  39.                     display defaults to the one specified in  the  |
  40.                     DDIISSPPLLAAYY environment variable.                  |
  41.  
  42.      --ff                                                                 ||
  43.                     Treat  all remaining arguments as file names.  |
  44.                     This option must be used to edit  a  file  if  |
  45.                     its  name starts with ``-'' or ``='' or ``+''  |
  46.                     or contains a ``:'' character.
  47.  
  48.      --ffgg _c_o_l_o_r      Use _c_o_l_o_r as the  foreground  color  for  the
  49.                     window.   If this switch isn't given then the
  50.                     ffoorreeggrroouunndd X default is used.   If  it  isn't
  51.                     given  either,  or if the display is a black-
  52.                     and-white one, then Black is used.
  53.  
  54.      --ffnn _f_o_n_t       Use _f_o_n_t as the font for the window.  If this
  55.                     switch  isn't  given, then the ffoonntt X default
  56.                     is used as  the  font.   If  it  isn't  given
  57.                     either, then the Sx default font is used.
  58.  
  59.      --ggeeoommeettrryy _g_e_o_m_e_t_r_y
  60.  
  61.  
  62.  
  63. Sprite v.1.0        Printed:  April 19, 1990                    1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MX                        User Commands                        MX
  71.  
  72.  
  73.  
  74.                     Use _g_e_o_m_e_t_r_y as the geometry for the  window.  |
  75.                     If  no  geometry  is specified on the command  |
  76.                     line, it the geometry defaults to  the  value  |
  77.                     of  the ggeeoommeettrryy X default.  If no default is  |
  78.                     specified, then mmxx picks a geometry.           |
  79.  
  80.      --hheellpp                                                              ||
  81.                     Print  out a list of the command-line options  |
  82.                     (and brief descriptions of  their  functions)  |
  83.                     and exit without opening a window.             |
  84.  
  85.      --iiccoonn _f_i_l_e                                                         ||
  86.                     _F_i_l_e  is the name of a file in bitmap format.  |
  87.                     Read the file and use it as the icon for  the  |
  88.                     window.    If  _f_i_l_e  is  llooccaallhhoosstt,  then  mmxx  |
  89.                     chooses the default icon  file  corresponding  |
  90.                     to the local host.                             |
  91.  
  92.      --iixx _x_c_o_o_r_d                                                         ||
  93.                     Display the icon at x-coordinate _x_c_o_o_r_d.       |
  94.  
  95.      --iiyy _y_c_o_o_r_d                                                         ||
  96.                     Display the icon at y-coordinate _y_c_o_o_r_d.
  97.  
  98.      --ssbb _c_o_l_o_r      Use _c_o_l_o_r as the  background  color  for  the
  99.                     window's  scrollbar.   If  this  switch isn't
  100.                     given then the ssccrroollllbbaarr..bbaacckkggrroouunndd X default
  101.                     is  used.  If it isn't given either, then the
  102.                     background color for the text window is used.
  103.  
  104.      --ssff _c_o_l_o_r      Use _c_o_l_o_r as the  foreground  color  for  the
  105.                     window's  scrollbar.   If  this  switch isn't
  106.                     given then the ssccrroollllbbaarr..ffoorreeggrroouunndd X default
  107.                     is  used.  If it isn't given either, then the
  108.                     foreground color for the text window is used.
  109.  
  110.      --ssee _c_o_l_o_r      Use _c_o_l_o_r  as  the  color  for  the  window's
  111.                     scrollbar  elevator.   If  this  switch isn't
  112.                     given then the ssccrroollllbbaarr..eelleevvaattoorr  X  default
  113.                     is  used.  If it isn't given either, then the
  114.                     background color for the text window is used.
  115.  
  116.      --sshhoowwttiittllee     Display a title bar at the top of the window.  |
  117.                     Mx  normally  assumes  that  a window manager  |
  118.                     will display a title  bar;   if  your  window  |
  119.                     manager  doesn't,  you  may  wish to use this  |
  120.                     switch.  If this switch isn't specified, then  |
  121.                     Mx  checks  for  a sshhoowwTTiittllee X default; if it  |
  122.                     exists and contains the string ``yes'',  then  |
  123.                     a title bar will be displayed.
  124.  
  125.      --tt _t_a_g         Look up _t_a_g in the tags file of  the  current
  126.  
  127.  
  128.  
  129. Sprite v.1.0        Printed:  April 19, 1990                    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MX                        User Commands                        MX
  137.  
  138.  
  139.  
  140.                     directory,  open  its file in the new window,
  141.                     and go to the line of the tag.
  142.  
  143.      --ttbb _c_o_l_o_r      Use _c_o_l_o_r as the  background  color  for  the
  144.                     window's  title  bar.   If  this switch isn't
  145.                     given then the ttiittllee..bbaacckkggrroouunndd X default  is
  146.                     used.   If  it  isn't  given either, then the
  147.                     background color for the text window is used.
  148.                     This option is ignored if Mx isn't displaying
  149.                     a title bar.
  150.  
  151.      --ttff _c_o_l_o_r      Use _c_o_l_o_r as the  foreground  color  for  the
  152.                     window's  title  bar.   If  this switch isn't
  153.                     given then the ttiittllee..ffoorreeggrroouunndd X default  is
  154.                     used.   If  it  isn't  given either, then the
  155.                     foreground color for the text window is used.
  156.                     This option is ignored if Mx isn't displaying
  157.                     a title bar.
  158.  
  159.      --ttss _c_o_l_o_r      Use _c_o_l_o_r as the color for the window's title
  160.                     stripes.  If this switch isn't given then the
  161.                     itle.stripe X default is used.  If  it  isn't
  162.                     given  either,  then the foreground color for
  163.                     the text window  is  used.   This  option  is
  164.                     ignored if Mx isn't displaying a title bar.
  165.  
  166.      ++              Position the file so its last line is visible
  167.                     in the window.
  168.  
  169.      ++_l_i_n_e_N_u_m_b_e_r    After opening  the  file,  select  the  first
  170.                     character  of  line "_l_i_n_e_N_u_m_b_e_r and make that
  171.                     line visible in the window.  For this switch,
  172.                     line  1  corresponds to the first line of the
  173.                     file.
  174.  
  175.      ++_s_e_a_r_c_h_P_a_t_t_e_r_n After opening the file, search for _s_e_a_r_c_h_P_a_t_-
  176.                     _t_e_r_n,  just  as  if a sseeaarrcchh command had been
  177.                     invoked.  If the  first  character  of  _s_e_a_r_-
  178.                     _c_h_P_a_t_t_e_r_n  is  a  slash  then  the  slash  is
  179.                     ignored (this is for vi compatibility and  to
  180.                     permit  search  patterns  that  begin  with a
  181.                     digit).
  182.  
  183.      ==_g_e_o_m_e_t_r_y      Use _g_e_o_m_e_t_r_y as the  geometry  specifier  for
  184.                     the  window  (same  effect  as  the --ggeeoommeettrryy
  185.                     ooppttiioonn))..
  186.  
  187.      _h_o_s_t:_d_i_s_p_l_a_y   Use this argument to select  the  display  on
  188.                     which  to  create  the window (same effect as
  189.                     the --ddiissppllaayy option).
  190.  
  191. _________________________________________________________________
  192.  
  193.  
  194.  
  195.  
  196.  
  197. Sprite v.1.0        Printed:  April 19, 1990                    3
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. MX                        User Commands                        MX
  205.  
  206.  
  207.  
  208. IINNTTRROODDUUCCTTIIOONN
  209.      MMxx is a mouse-oriented editor that uses  the  facilities  of
  210.      the  X  window system, the Sx supplementary library, and the
  211.      Tcl command interpreter.  It displays  a  window  containing  |
  212.      the  first _f_i_l_e argument and permits _f_i_l_e to be edited using  |
  213.      the commands defined below.  If no _f_i_l_e is  specified,  then  |
  214.      mmxx displays a file containing a tutorial introduction to mmxx.  |
  215.      If _f_i_l_e is specified as an empty string, then mmxx  creates  a  |
  216.      scratch  window without any particular file association.  MMxx  |
  217.      normally detaches itself from its  parent  (as  far  as  its  |
  218.      parent is concerned, mmxx will have exited);  if the --DD switch  |
  219.      is given, or if mmxx is invoked under the name mmxxssyynncc, then mmxx  |
  220.      doesn't detach itself from its parent.
  221.  
  222.      Almost all mmxx actions are invoked using Tcl  commands.   See
  223.      the  Tcl  documentation for information on the basic command
  224.      syntax and the built-in Tcl commands.  MMxx  extends  the  Tcl
  225.      built-in commands with additional commands for file editing;
  226.      the mmxx commands are described in the COMMANDS section below.
  227.      Commands  may  be invoked in any of three ways:  the command
  228.      subwindow, pull-down menus,  and  keystroke  bindings.   The
  229.      command  subwindow is a small entry window that is displayed
  230.      at the bottom of the mmxx window.  When it is displayed,  com-
  231.      mands may be entered there.  Pull-down menus appear in a bar
  232.      at the top of the mmxx window, and may be invoked by  pressing
  233.      a  mouse  button over the menu name and releasing it over an
  234.      entry in the menu.  Each menu entry has a command associated
  235.      with it;  when the entry is invoked, the command is executed
  236.      (see the mmeennuu command for information on how to  create  and
  237.      modify  menus).   The  third command invocation mechanism is
  238.      through keystroke bindings:  certain keystrokes, or combina-
  239.      tions  of  keystrokes,  have  commands associated with them.
  240.      When the keystroke sequence is typed, the associated command
  241.      is  executed  (see the bbiinndd command for details).  For exam-
  242.      ple, the ``a'' key is normally bound to the  command  iinnsseerrtt
  243.      aa,  which causes character ``a'' to be inserted at the caret
  244.      location.
  245.  
  246.      Many commands may be invoked either through a menu entry  or
  247.      a  keystroke  binding;   for  these  commands, the keystroke
  248.      sequence bound to the command appears at the right  side  of
  249.      the menu entry.
  250.  
  251.  
  252. ..MMXX FFIILLEESS
  253.      After processing command line options, opening  the  window,
  254.      and  reading  in  the file, mmxx checks for the existence of a
  255.      file ..mmxx in your home  directory  (which  is  given  by  the
  256.      environment variable HOME).  If the file exists, mmxx reads it
  257.      in and processes it as a command file, just as  if  it  were
  258.      read  with  the  ssoouurrccee  command.  Then it checks for an ..mmxx
  259.      file in the  current  directory,  and  processes  it  if  it
  260.  
  261.  
  262.  
  263. Sprite v.1.0        Printed:  April 19, 1990                    4
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270. MX                        User Commands                        MX
  271.  
  272.  
  273.  
  274.      exists.
  275.  
  276.  
  277. CCAARREETT AANNDD SSEELLEECCTTIIOONN
  278.      The mouse may be used to position the caret  (the  insertion
  279.      point) and to select ranges of text.  The same actions apply
  280.      both to the file or to the search  and  command  subwindows.
  281.      Left-clicking on a character positions the caret just before
  282.      that character.  Right-clicking will select all of the char-
  283.      acters  from  the  caret  up  to and including the character
  284.      under the pointer.  If the left button is clicked  twice  in
  285.      quick  succession  without moving the mouse, it invokes word
  286.      selection:  the word  containing  the  character  under  the
  287.      pointer  is  selected,  the  caret is positioned at the left
  288.      side of the word, and future right clicks will  select  only
  289.      full  words.   If  the  left  button is triple-clicked, line
  290.      selection will be invoked.  If the control key is held  down
  291.      while  left-  and  right-clicking, the selection will be set
  292.      without changing the caret or input focus.
  293.  
  294.  
  295. VVAARRIIAABBLLEESS
  296.      There are several Tcl global variables that are set or  used
  297.      by mmxx in some situations:
  298.  
  299.           ffiillee Set by mmxx to the name of the file  loaded  in  the
  300.                window (which is the first name in $$ffiilleess.          |
  301.  
  302.           ffiilleess                                                         ||
  303.                Set  by  mmxx  to  a  list of all the _f_i_l_e arguments  |
  304.                specified on the command  line  that  created  the  |
  305.                window.
  306.  
  307.           ggeeoommeettrryy
  308.                Geometry to use when creating new windows, if none
  309.                is  given  as  part  of the ooppeenn command.  See the
  310.                ooppeenn command for details.
  311.  
  312.           hheeiigghhtt
  313.                Set by mmxx to indicate the height of the window, in
  314.                lines  of text.  If the last line appearing in the
  315.                window  is  only  partially  visible,  it  doesn't
  316.                count.
  317.  
  318.           hheellppDDiirr
  319.                MMxx presets this variable to the  location  of  the
  320.                directory  containing help information such as the
  321.                tutorials.
  322.  
  323.           hhiissttoorryy
  324.                MMxx automatically changes  this  variable  on  each
  325.                mouse  click  to  hold  information  about all the
  326.  
  327.  
  328.  
  329. Sprite v.1.0        Printed:  April 19, 1990                    5
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336. MX                        User Commands                        MX
  337.  
  338.  
  339.  
  340.                recently-executed  commands.    Several   of   the
  341.                default  key  bindings  and  menu entries also set
  342.                this variable.  See the HISTORY  section  and  the
  343.                hhiissttoorryy command for more information.
  344.  
  345.           nneewwWWiinnddooww
  346.                During the ooppeenn command, mmxx sets this global vari-
  347.                able to hold the id of the newly-created window.
  348.  
  349.           nnooRReeggEExxppss
  350.                If this variable is set  to  ``1'',  searches  and
  351.                replaces will use plain strings.  By default, pat-
  352.                tern matching takes place  with  vi-style  regular
  353.                expressions.
  354.  
  355.           rreeppllaacceeCCmmdd
  356.                When  the  middle  button  is   clicked   in   the
  357.                ``Replace''  string entry, or when carriage-return
  358.                is typed there, the contents of this variable  are
  359.                executed as a command.
  360.  
  361.           rreeppllaacceeSSttrriinngg
  362.                Set by mmxx to hold the contents of the  replacement
  363.                entry subwindow.
  364.  
  365.           sseeaarrcchhCCmmdd
  366.                When  the  middle  button  is   clicked   in   the
  367.                ``Search''  string  entry, or when carriage-return
  368.                is typed there, the contents of this variable  are
  369.                executed as a command.
  370.  
  371.           sseeaarrcchhSSttrriinngg
  372.                Set by mmxx to hold the contents of the search entry
  373.                subwindow.
  374.  
  375.           ttaaggFFiilleess
  376.                List of  tags  files  to  check  in  ttaagg  command,
  377.                separated by white space.  See the ttaagg command for
  378.                details.  This variable is  read  by  mmxx  but  not
  379.                written.
  380.  
  381.           vveerrssiioonn
  382.                Set by mmxx to hold a version  number  in  the  form  |
  383.                _x._y,  where changes in _x correspond to major revi-  |
  384.                sions with probable incompatibilities, and changes  |
  385.                in  _y  represent small bug fixes and upgrades that  |
  386.                should not cause substantial  compatibility  prob-  |
  387.                lems.
  388.  
  389.           wwiiddtthh
  390.                The width of the window, in  characters.   If  the
  391.                last character position is only partially-visible,
  392.  
  393.  
  394.  
  395. Sprite v.1.0        Printed:  April 19, 1990                    6
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402. MX                        User Commands                        MX
  403.  
  404.  
  405.  
  406.                then it doesn't count.  If a  variable-width  font
  407.                is  being used, the average character size is used
  408.                in computing the window's width.
  409.  
  410.  
  411. MMAARRKKSS
  412.      A mark is a string that identifies a position in  the  file.
  413.      It has the format
  414.  
  415.           _l_i_n_e.._c_h_a_r
  416.      where _l_i_n_e is a line number in the file and _c_h_a_r is a  posi-
  417.      tion within that line.  For historical reasons, lines number
  418.      from 1 and characters number from 0.
  419.  
  420.      Most commands that deal with positions in the file, such  as
  421.      sseeee  and  ddeelleettee, take marks as arguments.  Typically, marks
  422.      are stored as the values of  variables,  although  they  may
  423.      also  be  typed  in directly.  The mmaarrkk command provides for
  424.      simple mark arithmetic.  The position indicated  in  a  mark
  425.      need  not  actually exist in the file;  at the time the mark
  426.      is used it is rounded off to the closest actual position  in
  427.      the  file.  For example, if the line number doesn't exist in
  428.      the file then it is changed to the last line;  if the  char-
  429.      acter  position  would like off the end of the line, then it
  430.      is rounded to the position of  the  last  character  in  the
  431.      line.
  432.  
  433.      When a command specifies that one of its arguments must be a
  434.      mark, the mark may either be specified in the _l_i_n_e._c_h_a_r form
  435.      (either directly or through command  or  variable  substitu-
  436.      tion),  or it may be specified symbolically using one of the
  437.      following names, which refer to special locations:
  438.  
  439.      bboottttoomm
  440.           This special mark refers to the character that  appears
  441.           in the bottom left corner of the window.
  442.  
  443.      ccaarreett
  444.           The special mark ccaarreett  corresponds  to  the  character
  445.           just to the right of the caret position.
  446.  
  447.      cceenntteerr
  448.           The leftmost character on the center line of  the  win-
  449.           dow.
  450.  
  451.      eeooff  The last character in the file (which is always a  new-
  452.           line character).
  453.  
  454.      sseell..lleefftt
  455.           The leftmost selected character.  This form of mark may
  456.           only  be used if the selection is in the file that's in
  457.           this window.
  458.  
  459.  
  460.  
  461. Sprite v.1.0        Printed:  April 19, 1990                    7
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468. MX                        User Commands                        MX
  469.  
  470.  
  471.  
  472.      sseell..rriigghhtt
  473.           The rightmost selected character.  This  form  of  mark
  474.           may only be used if the selection is in the file that's
  475.           in this window.
  476.  
  477.      ttoopp  The character that appears in the top  left  corner  of
  478.           the window.
  479.  
  480.  
  481. HHIISSTTOORRYY
  482.      Under normal circumstances, MMxx continuously records all  the
  483.      top-level  commands  being  executed, including those coming
  484.      from keystrokes, menu entries, and the command, search,  and
  485.      replace  subwindows.   On each button click, undo, or search
  486.      operation, all of the recorded commands  are  saved  in  the
  487.      variable  hhiissttoorryy  and the record is cleared.  Thus the hhiiss--
  488.      ttoorryy variable describes all the  commands  executed  between
  489.      the  last  two  events  in  the above group.  It may then be
  490.      invoked as a command to repeat recent actions.
  491.  
  492.      Under normal circumstances, mmxx does not  record  information
  493.      about  mouse  clicks,   searching,  undoing, or hhiissttoorryy com-
  494.      mands.  In  addition,  changes  of  focus  to  the  command,
  495.      search,  or  replace  subwindows  are not normally recorded.
  496.      Having these commands included in the hhiissttoorryy variable turns
  497.      out  to cause more trouble than good.  However, much of this
  498.      behavior is enforced by using the hhiissttoorryy command in the key
  499.      bindings  and  menus  established by the mmxx startup file, so
  500.      you can change  it  if  you  wish.   Only  the  mouse  click
  501.      behavior  and  mmxx's  refusal  to record hhiissttoorryy commands are
  502.      hard-wired.  See the hhiissttoorryy command for information on  how
  503.      to control command recording.
  504.  
  505.  
  506. CCOOMMMMAANNDDSS
  507.      The mmxx built-in commands are described below.   In  addition
  508.      to these commands, any of the Tcl built-in commands may also
  509.      be used.  Whenever a top-level command is invoked  (i.e.  in
  510.      response to a keystroke or menu selection, as opposed to the
  511.      execution of a command procedure), if it returns a non-empty
  512.      result  then  the result is displayed in the message window.
  513.      If the command returns an error then the  error  message  is
  514.      displayed in the message window.
  515.  
  516.      bbiinndd [_s_e_q_u_e_n_c_e [_c_o_m_m_a_n_d]]
  517.           If the _s_e_q_u_e_n_c_e and _c_o_m_m_a_n_d arguments are  given,  this
  518.           command associates the keystroke sequence _s_e_q_u_e_n_c_e with
  519.           _c_o_m_m_a_n_d and returns an  empty  string.   From  now  on,
  520.           whenever  _s_e_q_u_e_n_c_e  is  typed  in  the  window, the Tcl
  521.           interpreter will be invoked  to  execute  _c_o_m_m_a_n_d.   If
  522.           _s_e_q_u_e_n_c_e  is  already  bound to a command, then _c_o_m_m_a_n_d
  523.           replaces the previous binding.  If there are two  bound
  524.  
  525.  
  526.  
  527. Sprite v.1.0        Printed:  April 19, 1990                    8
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534. MX                        User Commands                        MX
  535.  
  536.  
  537.  
  538.           sequences  of  which one is a prefix of the other, then
  539.           the shorter sequence will always match in preference to
  540.           the  longer  one.   If _c_o_m_m_a_n_d is an empty string, then
  541.           the binding for _s_e_q_u_e_n_c_e (if any) is  deleted,  leaving
  542.           _s_e_q_u_e_n_c_e unbound.
  543.  
  544.           If the first character of _c_o_m_m_a_n_d is ``!'',  it  signi-
  545.           fies that no undo marks are to be generated around this
  546.           command;  the ``!'' is stripped from the command before
  547.           executing  it.   If  several  key bindings in a row are
  548.           invoked and each had the ``!'' prefix, then all of  the
  549.           invocations  will  be undone together as a single unit.
  550.           If _c_o_m_m_a_n_d consists of nothing but the character  ``@@''
  551.           (optionally  preceded  by  ``!''),  then  whenever this
  552.           binding is invoked the command ``iinnsseerrtt _k_e_y''  will  be
  553.           executed,  where  _k_e_y is the last key typed on the key-
  554.           board.  ``!!@@'' is typically used as the binding for all
  555.           the standard ASCII characters.
  556.  
  557.           If _c_o_m_m_a_n_d  isn't  specified,  then  the  _b_i_n_d  command
  558.           returns  the current binding for _s_e_q_u_e_n_c_e, or the empty
  559.           string if there is no binding for _s_e_q_u_e_n_c_e.  If neither
  560.           _s_e_q_u_e_n_c_e  or  _c_o_m_m_a_n_d is given, then bbiinndd returns a Tcl
  561.           list whose elements are the _s_e_q_u_e_n_c_es  associated  with
  562.           all known keystroke bindings.
  563.  
  564.      ccaarreett _m_a_r_k
  565.  
  566.      ccaarreett ddiissppllaayy _t_y_p_e
  567.           In the single-argument form of this command, the  caret  |
  568.           is  moved  to just before the character at the position  |
  569.           given by _m_a_r_k.  The two-argument form is used to change  |
  570.           the  way  the  caret position is displayed.  If _t_y_p_e is  |
  571.           ccaarreett, the caret position  will  always  be  marked  by  |
  572.           displaying a caret just before the caret character.  If  |
  573.           _t_y_p_e is bblloocckk, the caret position  will  be  marked  by  |
  574.           displaying  the  caret  character in reverse video.  If  |
  575.           _t_y_p_e is ooffff, then the caret position will not be marked  |
  576.           with  any  sort of special display.  Finally, a _t_y_p_e of  |
  577.           vviibblloocckk marks the caret position with a block  when  in  |
  578.           vi  mode  and with a caret otherwise (this mode is only  |
  579.           relevant for ttxx).  The ccaarreett command returns  an  empty  |
  580.           string.
  581.  
  582.      cclleeaann
  583.           Pretend that the contents  of  this  window  were  just
  584.           written  to  disk  (but don't actually write anything).
  585.           Until the next time  the  file  is  modified,  mmxx  will
  586.           assume  that  the  window  is ``clean'':  if you invoke
  587.           commands like qquuiitt or sswwiittcchh then mmxx will happily  dis-
  588.           card  the contents of the window without warning you or
  589.           giving you a chance to abort the command.
  590.  
  591.  
  592.  
  593. Sprite v.1.0        Printed:  April 19, 1990                    9
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600. MX                        User Commands                        MX
  601.  
  602.  
  603.  
  604.      ccoolluummnn _m_a_r_k
  605.           Return the column corresponding to the left edge of the
  606.           character at the position indicated by _m_a_r_k.  _M_a_r_k must
  607.           be a valid mark.  Columns are computed by treating nor-
  608.           mal  characters  as one column wide, control characters
  609.           as two columns wide, and tabs as wide enough to  extend
  610.           up  to  the  next  8-column boundary.  Character 0 of a
  611.           line is at column 0.
  612.  
  613.      ccoonnttrrooll _o_p_t_i_o_n _s_t_r_i_n_g
  614.           This command performs control-character  processing  on
  615.           _s_t_r_i_n_g, depending on the value of ooppttiioonn (abbreviations
  616.           are OK):
  617.  
  618.           ccoonnttrrooll bbaacckkssllaasshh _s_t_r_i_n_g
  619.                Returns a  string  that  is  identical  to  _s_t_r_i_n_g
  620.                except  that  non-printing characters are replaced
  621.                with backslash  sequences.   The  newline  control
  622.                character  is  replaced  with  \\nn, tab is replaced
  623.                with \\tt, backspace is replaced with  \\bb,  and  any
  624.                other non-printing character is replaced with \\_d_d_d
  625.                where _d_d_d gives the octal value of the character.
  626.  
  627.           ccoonnttrrooll bbiinnddiinngg _s_t_r_i_n_g
  628.                This command is used primarily to produce a print-
  629.                able  description  of a keystroke sequence that is
  630.                bound to a command.  It returns a string  consist-
  631.                ing of space-separated fields corresponding to the
  632.                characters of _s_t_r_i_n_g.  If a  _s_t_r_i_n_g  character  is
  633.                space,  its  corresponding field is ``SPACE'';  if
  634.                the _s_t_r_i_n_g character is a normal printing  charac-
  635.                ter then the field is just that character;  if the
  636.                _s_t_r_i_n_g character is rubout (1778) the  correspond-
  637.                ing field is ``DEL''; if the _s_t_r_i_n_g character is a
  638.                control character, the corresponding field  is  of
  639.                the  form ``C-a''; if the _s_t_r_i_n_g character has its
  640.                high-order bit set (2008), then the field  is  the
  641.                same as if the high-order bit were not set, except
  642.                that ``M-'' is prepended (3018 translates to  ``M-
  643.                A'').
  644.  
  645.           ccoonnttrrooll mmaakkee _s_t_r_i_n_g
  646.                Returns a string of the  same  length  as  _s_t_r_i_n_g.
  647.                Each  character  in  the  result  is  the  control
  648.                equivalent of the _s_t_r_i_n_g  character  (e.g.,  ``a''
  649.                and  ``A''  convert  to control-A).  The character
  650.                ``?'' converts to rubout (1778).  You may not  use
  651.                this command to generate a null character (0).
  652.  
  653.      ddeelleettee _m_a_r_k_1 [_m_a_r_k_2 [nnoovviieewwcchhaannggee]]
  654.           Delete all of the characters between _m_a_r_k_1  and  _m_a_r_k_2,
  655.           inclusive.   If  _m_a_r_k_2 isn't specified, then delete the
  656.  
  657.  
  658.  
  659. Sprite v.1.0        Printed:  April 19, 1990                   10
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666. MX                        User Commands                        MX
  667.  
  668.  
  669.  
  670.           single character  at  _m_a_r_k_1.   Normally,  this  command
  671.           changes  the  view in the window if necessary to ensure
  672.           that  the  point  of  the  deletion  is  visible;    if
  673.           nnoovviieewwcchhaannggee  is  specified then the view in the window
  674.           will not be changed.  Returns an empty string.
  675.  
  676.      eexxttrraacctt _m_a_r_k_1 [_m_a_r_k_2]
  677.           Return as result all of  the  characters  in  the  file
  678.           between  the  two  marks  _m_a_r_k_1 and _m_a_r_k_2.  If _m_a_r_k_2 is
  679.           omitted, then return the single character at _m_a_r_k_1.
  680.  
  681.      ffooccuuss _w_i_n_d_o_w [cclleeaarr]
  682.           Arrange for all future keyboard input to be directed to
  683.           _w_i_n_d_o_w,  regardless of the mouse position.  _W_i_n_d_o_w must
  684.           have one of the following values (or a unique abbrevia-
  685.           tion for it):
  686.  
  687.           ccoommmmaanndd
  688.                The command window that appears at the  bottom  of
  689.                the file.
  690.  
  691.           ffiillee The main window, which  displays  the  file  being
  692.                edited.
  693.  
  694.           rreeppllaaccee
  695.                The  replace  entry,  which   is   part   of   the
  696.                search/replace window that appears just underneath
  697.                the menu bar.
  698.  
  699.           sseeaarrcchh
  700.                The search entry in the search/replace window.
  701.  
  702.           If _w_i_n_d_o_w isn't displayed when this command is invoked,
  703.           mmxx  displays  it.   Ifthe cclleeaarr option is specified (or
  704.           any abbreviation of cclleeaarr) then  the  contents  of  the
  705.           given  window are cleared.  The cclleeaarr option is ignored
  706.           if _w_i_n_d_o_w is ffiillee.  If input focussing  has  been  dis-
  707.           abled  by  the  .Xdefaults  file,  then ffooccuuss will open
  708.           and/or clear _w_i_n_d_o_w, but will not focus on it.  Returns
  709.           an empty string.
  710.  
  711.      ggeeoommeettrryy _s_p_e_c
  712.           Set the size and/or location of the window according to
  713.           the  information  in _s_p_e_c.  _S_p_e_c should be in the stan-
  714.           dard format for X geometry specifications (==8800xx2244,  for
  715.           example).  Returns an empty string.
  716.  
  717.      hhiissttoorryy _o_p_t_i_o_n [_a_r_g]
  718.           Control the history recording process.  The exact func-
  719.           tion  depends  on  _o_p_t_i_o_n  (which  may  be  abbreviated
  720.           uniquely):
  721.  
  722.  
  723.  
  724.  
  725. Sprite v.1.0        Printed:  April 19, 1990                   11
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732. MX                        User Commands                        MX
  733.  
  734.  
  735.  
  736.           hhiissttoorryy aadddd _i_n_f_o
  737.                Append _i_n_f_o to the current history record as if it
  738.                had  been  invoked as a command.  Returns an empty
  739.                string.
  740.  
  741.           hhiissttoorryy cclleeaarr
  742.                Discard all of the information in the current his-
  743.                tory record.  Returns an empty string.
  744.  
  745.           hhiissttoorryy iiggnnoorree _c_o_m_m_a_n_d
  746.                Execute _c_o_m_m_a_n_d but don't record it in the history
  747.                record.   Note  that  no hhiissttoorryy commands are ever
  748.                recorded, even if they don't appear as the _c_o_m_m_a_n_d
  749.                argument  to  hhiissttoorryy  iiggnnoorree.   Returns  an empty
  750.                string.
  751.  
  752.           hhiissttoorryy iinnffoo
  753.                Returns the current history record, with  commands
  754.                separated by newlines.
  755.  
  756.           hhiissttoorryy nneexxtt _v_a_r_N_a_m_e [_c_o_m_m_a_n_d]
  757.                Store the current history record in  the  variable
  758.                _v_a_r_N_a_m_e,  then  clear  the  history record.  After
  759.                clearing the history record, if _c_o_m_m_a_n_d is  speci-
  760.                fied then execute it but don't record it.  Returns
  761.                an empty string.
  762.  
  763.           hhiissttoorryy ooffff
  764.                Disable history recording.  Invocations of hhiissttoorryy
  765.                ooffff  nest:   recording  will  not  resume until an
  766.                equal number of  hhiissttoorryy  oonn  commands  have  been
  767.                invoked.  Returns an empty string.
  768.  
  769.           hhiissttoorryy oonn
  770.                Re-enable  history  recording  if  the  cumulative
  771.                number  of  hhiissttoorryy oonn commands is greater than or
  772.                equal to the number of hhiissttoorryy ooffff commands.  This
  773.                command is ignored if history recording is already
  774.                enabled.  Returns an empty string.
  775.  
  776.      iinnddeenntt _m_a_r_k_1 _m_a_r_k_2 [++|--] _a_m_o_u_n_t
  777.           Change the indentation of all the lines  between  _m_a_r_k_1
  778.           and _m_a_r_k_2, inclusive.  If no sign is given, then _a_m_o_u_n_t
  779.           specifies an absolute indentation:   for  each  of  the
  780.           lines,  the  indentation  will  be  set  to _a_m_o_u_n_t.  If
  781.           _a_m_o_u_n_t is preceded by a minus (plus) argument, then the
  782.           indentation of each line will be reduced (increased) by
  783.           _a_m_o_u_n_t units.  To set the indentation for a line to  _i,
  784.           mmxx deletes all the leading blanks and tabs in the line,
  785.           then inserts _i/8 tabs followed by  (_i  mod  8)  spaces.
  786.           Returns an empty string.
  787.  
  788.  
  789.  
  790.  
  791. Sprite v.1.0        Printed:  April 19, 1990                   12
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798. MX                        User Commands                        MX
  799.  
  800.  
  801.  
  802.      iinnsseerrtt _b_y_t_e_s [_m_a_r_k]
  803.           If _m_a_r_k is specified, it contains a mark;  iinnsseerrtt  will
  804.           insert  the  contents of the _b_y_t_e_s argument just before
  805.           the character at position _m_a_r_k.  Otherwise the  command
  806.           will  insert  _b_y_t_e_s  at  the  position  of  the  caret.
  807.           Returns an empty string.
  808.  
  809.      mmaarrkk _s_r_c _o_p _a_r_g_s
  810.           Return a position in the file in  the  form  _l_i_n_e._c_h_a_r,
  811.           where  _l_i_n_e is a line in the file and _c_h_a_r is a charac-
  812.           ter in the line (lines number from 1,  characters  from
  813.           0).  _S_r_c must be a valid mark; the return value is com-
  814.           puted by performing  some  operation  on  the  position
  815.           given by _s_r_c, depending on _o_p and _a_r_g_s:
  816.  
  817.           mmaarrkk _s_r_c
  818.                Return the value of mark _s_r_c.  This form  is  used
  819.                to  retrieve  the value of a built-in mark such as
  820.                sseell..lleefftt.
  821.  
  822.           mmaarrkk _s_r_c _d_i_r_e_c_t_i_o_n _a_m_o_u_n_t _u_n_i_t_s
  823.                Return the position of the character _a_m_o_u_n_t  _u_n_i_t_s
  824.                away  from _s_r_c.  _S_r_c must be a valid mark.  _D_i_r_e_c_-
  825.                _t_i_o_n must be ffoorrwwaarrdd  or  bbaacckkwwaarrdd;  it  indicates
  826.                which  direction  to  move  from _s_r_c.  _A_m_o_u_n_t is a
  827.                decimal number indicating how  far  to  move,  and
  828.                _u_n_i_t_s  indicates  the  units  for  motion:  cchhaarrss,
  829.                wwoorrddss, or lliinneess.  For example, mmaarrkk $$bb  ffoorrwwaarrdd  11
  830.                wwoorrdd will set variable aa to point to the beginning
  831.                of the word just  after  the  one  containing  the
  832.                position indicated by variable bb.
  833.  
  834.           mmaarrkk _s_r_c cchhaarr _i_n_d_e_x
  835.                Return the position of the _i_n_d_e_x'th  character  in
  836.                the  line  given by _s_r_c.  If _i_n_d_e_x is -1, then _d_s_t
  837.                will refer to the last character on _s_r_c's line.
  838.  
  839.           mmaarrkk _s_r_c ccoolluummnn _i_n_d_e_x
  840.                Return the position of the character  that  covers
  841.                column  _i_n_d_e_x on the line containing _s_r_c.  Columns
  842.                are computed by treating normal characters as  one
  843.                space wide, control characters as two spaces wide,
  844.                tabs as wide enough to extend up to  the  next  8-
  845.                column boundary, and the newline at the end of the
  846.                line as infinitely wide.  Columns number from 0.
  847.  
  848.           mmaarrkk _s_r_c lliinnee _i_n_d_e_x
  849.                Return the position whose line number is _i_n_d_e_x but
  850.                whose character position is the same as _s_r_c's.
  851.  
  852.           mmaarrkk _s_r_c ppaarreenntthheessiiss [_v_a_r_N_a_m_e]
  853.                Return the position of the first character of  the
  854.  
  855.  
  856.  
  857. Sprite v.1.0        Printed:  April 19, 1990                   13
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864. MX                        User Commands                        MX
  865.  
  866.  
  867.  
  868.                parenthesis  that  matches  the  one pointed to by
  869.                _s_r_c.  If _s_r_c doesn't point to a parenthesis,  then
  870.                return  _s_r_c.   If  _v_a_r_N_a_m_e  is  specified, then it
  871.                names a variable that is set to refer to the  last
  872.                character   of   the  matching  parenthesis  (this
  873.                feature is only useful for  parentheses  that  are
  874.                more than one character long).
  875.  
  876.           mmaarrkk _s_r_c sseeaarrcchh _d_i_r_e_c_t_i_o_n _p_a_t_t_e_r_n [_v_a_r_N_a_m_e]
  877.                Search for _p_a_t_t_e_r_n and return the position of  the
  878.                first character of the matching range.  If _v_a_r_N_a_m_e
  879.                is given, it names a variable that is set  to  the
  880.                last  character of the matching range.  The search
  881.                starts at the position given by _s_r_c and  continues
  882.                in  _d_i_r_e_c_t_i_o_n,  which  must  be  either ffoorrwwaarrdd or
  883.                bbaacckkwwaarrdd.  The search is circular:  if  a  forward
  884.                search reaches the end of the file then it contin-
  885.                ues  at  the  beginning;   if  a  backward  search
  886.                reaches  the beginning of the file then it contin-
  887.                ues at the end.  If no match is found, then _s_r_c is
  888.                returned (and stored in the variable named by _v_a_r_-
  889.                _N_a_m_e, if specified).
  890.  
  891.      mmeennuu _o_p_t_i_o_n [args]
  892.           The mmeennuu command is used to  manipulate  the  pull-down
  893.           menus  displayed  at  the  top  of  the window.  It has
  894.           several forms, depending on _o_p_t_i_o_n:
  895.  
  896.           mmeennuu aappppeenndd _n_a_m_e _l_e_f_t_T_e_x_t _c_e_n_t_e_r_T_e_x_t _r_i_g_h_t_T_e_x_t _c_o_l_o_r _c_m_d
  897.                Append  a  new  entry  onto  menu _n_a_m_e, which must
  898.                already  exist.   The  _l_e_f_t_T_e_x_t,  _c_e_n_t_e_r_T_e_x_t,  and
  899.                _r_i_g_h_t_T_e_x_t  arguments  give strings to be displayed
  900.                left-justified,  centered,   and   right-justified
  901.                (respectively)  in  the menu entry.  If any of the
  902.                arguments is an empty string or the single charac-
  903.                ter ``-'', then no text is displayed in that posi-
  904.                tion.  _C_o_l_o_r gives the background color to use for
  905.                the entry;  if it is an empty string or ``-'' then
  906.                the standard background color for  the  window  is
  907.                used.   _C_m_d  is  a  command to invoke whenever the
  908.                menu entry is invoked.  Returns an empty string.
  909.  
  910.           _l_e_f_t_T_e_x_t ...
  911.           mmeennuu ccrreeaattee _n_a_m_e _l_e_f_t_T_e_x_t  _c_e_n_t_e_r_T_e_x_t  _r_i_g_h_t_T_e_x_t  _c_o_l_o_r  _c_m_d
  912.                Create  a new menu, which will be displayed to the
  913.                right of any existing menus in the menu bar.   The
  914.                new menu's name will be _n_a_m_e.  If there is already
  915.                a menu named _n_a_m_e, then it will be  replaced  (the
  916.                new menu will occupy the same position in the menu
  917.                bar as the old menu).  Following the _n_a_m_e argument
  918.                are  any  number of groups of five arguments, with
  919.                each group describing one entry in  the  new  menu
  920.  
  921.  
  922.  
  923. Sprite v.1.0        Printed:  April 19, 1990                   14
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930. MX                        User Commands                        MX
  931.  
  932.  
  933.  
  934.                from  top  down.  The five arguments for each menu
  935.                entry have the same meaning as  for  mmeennuu  aappppeenndd.
  936.                Returns an empty string.
  937.  
  938.           mmeennuu ddeelleettee _n_a_m_e
  939.                Delete the menu named _n_a_m_e  and  return  an  empty
  940.                string.
  941.  
  942.           mmeennuu iinnffoo
  943.                Return a Tcl list whose entries are the  names  of
  944.                the menus for this window, in order.
  945.  
  946.           mmeennuu iinnffoo _n_a_m_e
  947.                Returns a Tcl list  containing  information  about
  948.                menu  _n_a_m_e.  Each entry in the list corresponds to
  949.                one entry in the menu, in  order  from  top  down.
  950.                Each entry is itself a Tcl list with four entries,
  951.                which are the _l_e_f_t_T_e_x_t, _c_e_n_t_e_r_T_e_x_t, _r_i_g_h_t_T_e_x_t, and
  952.                _c_m_d values from mmeennuu ccrreeaattee or mmeennuu aappppeenndd.
  953.  
  954.           _c_o_l_o_r _c_m_d
  955.           mmeennuu mmooddiiffyy _n_a_m_e _e_n_t_r_y_I_n_d_e_x  _l_e_f_t_T_e_x_t  _c_e_n_t_e_r_T_e_x_t  _r_i_g_h_t_T_e_x_t
  956.                Change  the  _e_n_t_r_y_I_n_d_e_x'th  entry  in menu _n_a_m_e as
  957.                indicated by arguments _l_e_f_t_T_e_x_t through _c_m_d.  Each
  958.                of these five arguments has the same meaning as in
  959.                mmeennuu aappppeenndd.  Entry 0 is the topmost entry in  the
  960.                menu.  Returns an empty string.
  961.  
  962.      mmeessssaaggee _s_t_r_i_n_g                                                     ||
  963.           Display _s_t_r_i_n_g in the message subwindow.
  964.  
  965.      nneewwlliinnee
  966.           Insert a newline  character  at  the  position  of  the
  967.           caret,  and adjust indentation.  If the caret's initial
  968.           line consists of nothing but space, then all the  space
  969.           on  the  line  is deleted.  If the caret's initial line
  970.           contains leading space, it is reorganized to consist of
  971.           zero  or more tabs followed by zero or more space char-
  972.           acters, such that the total width of white space is the
  973.           same after the change as before (a tab counts for eight
  974.           characters).  Tabs  and  spaces  are  inserted  on  the
  975.           caret's  new  line  to  match  the  indentation  of the
  976.           caret's initial line.
  977.  
  978.      ooppeenn [_o_p_t_i_o_n_s] _f_i_l_e _f_i_l_e ...
  979.           Open a new window.   _O_p_t_i_o_n_s  and  _f_i_l_e  arguments  are  |
  980.           treated  just  the same as they are treated on the com-  |
  981.           mand line, except for the following exceptions.  The --DD  |
  982.           option is not permitted, nor are options that specify a  |
  983.           display.  If _f_i_l_e is not specified,  a  new  window  is  |
  984.           opened  on  the same file as the current window.  If no  |
  985.           geometry specification is given  in  _o_p_t_i_o_n_s,  then  mmxx  |
  986.  
  987.  
  988.  
  989. Sprite v.1.0        Printed:  April 19, 1990                   15
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996. MX                        User Commands                        MX
  997.  
  998.  
  999.  
  1000.           uses  the contents of the global variable ggeeoommeettrryy as a  |
  1001.           default geometry;  if no ggeeoommeettrryy variable exists, then  |
  1002.           mmxx  picks  a  default geometry.  Other options, such as  |
  1003.           foreground color and font, default to the  values  from  |
  1004.           the   invoking   window,  rather  than  looking  for  X  |
  1005.           defaults.  OOppeenn sets the global variable  nneewwWWiinnddooww  in  |
  1006.           the invoking window to hold the id of the newly-created  |
  1007.           window.  This may be used in conjunction with the  sseenndd  |
  1008.           command  to  issue  commands  to  the  new window.  The  |
  1009.           return value is always an empty string.
  1010.  
  1011.      qquuiitt Destroy the window.  If this is the last remaining win-
  1012.           dow on its file and if the file has been modified since
  1013.           the last time it was written, then the user is notified
  1014.           and  given  a chance to save the file or abort the com-
  1015.           mand.  This command always returns an error,  in  order
  1016.           to  abort  any  partially-executed commands that are in
  1017.           progress (execution of further commands on  the  window
  1018.           could cause a core dump).
  1019.  
  1020.      qquuoottee
  1021.           Quote the next input character.  The  mapping  for  the  |
  1022.           next  character  will be ignored and the character will  |
  1023.           be inserted.  The  return  value  is  always  an  empty  |
  1024.           string.
  1025.  
  1026.      rreeaadd _f_i_l_e
  1027.           Read _f_i_l_e and  insert  its  contents  just  before  the
  1028.           caret.
  1029.  
  1030.      rreeppllaaccee [_o_p_t_i_o_n _a_r_g_s]
  1031.           Replace the selection,  as  determined  by  _o_p_t_i_o_n  and
  1032.           _a_r_g_s:
  1033.  
  1034.           rreeppllaaccee
  1035.                If no _o_p_t_i_o_n is given, then replace the  selection
  1036.                by the value of the rreeppllaacceeSSttrriinngg global variable.
  1037.                If the search subwindow isn't  visible,  don't  do
  1038.                any  replacement but open the search subwindow and
  1039.                focus input on the replacement string entry.
  1040.  
  1041.           rreeppllaaccee rraannggee _s_t_a_r_t _s_t_o_p [_p_a_t_t_e_r_n _s_t_r_i_n_g]
  1042.                Search the range of text between the  marks  _s_t_a_r_t
  1043.                and  _s_t_o_p,  inclusive  for occurrences of _p_a_t_t_e_r_n.
  1044.                Replace each occurrence with _s_t_r_i_n_g.   If  _p_a_t_t_e_r_n
  1045.                and  _s_t_r_i_n_g  aren't specified, then they are taken
  1046.                from the  sseeaarrcchhSSttrriinngg  and  rreeppllaacceeSSttrriinngg  global
  1047.                variables.  If the search subwindow isn't visible,
  1048.                don't do  any  replacement  but  open  the  search
  1049.                subwindow  and  focus  input  on  the  replacement
  1050.                string  entry.   By  default,   vi-style   regular  |
  1051.                expressions   are   used   for   the  pattern  and  |
  1052.  
  1053.  
  1054.  
  1055. Sprite v.1.0        Printed:  April 19, 1990                   16
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062. MX                        User Commands                        MX
  1063.  
  1064.  
  1065.  
  1066.                replacement  strings.   If  the  variable  ``noRe-  |
  1067.                gExps''  is  set to ``1'', only simple matching is  |
  1068.                done: there are no wild cards.   Matches  must  be  |
  1069.                within a single line of the file.
  1070.  
  1071.           rreeppllaaccee sseelleeccttiioonn _s_t_r_i_n_g
  1072.                Delete the selection  and  insert  _s_t_r_i_n_g  in  its
  1073.                place.
  1074.      The rreeppllaaccee command always returns an empty string.
  1075.  
  1076.      rreesseett
  1077.           Discard the version  of  the  file  that  is  currently  |
  1078.           loaded  in  memory  and  re-load the file from its disk  |
  1079.           version.  Any changes that have  been  made  since  the  |
  1080.           last  time  the file was saved will be lost (but you'll  |
  1081.           be warned in this case and given a chance to  skip  the  |
  1082.           command).   This command will affect all of the windows  |
  1083.           open on the file.
  1084.  
  1085.      sseeaarrcchh [_d_i_r_e_c_t_i_o_n [_p_a_t_t_e_r_n]]
  1086.           Search for a  pattern.   The  search  starts  from  the
  1087.           beginning  of the selection (if there is a selection in
  1088.           the window's file), or from the  caret  if  there's  no
  1089.           selection.   _D_i_r_e_c_t_i_o_n  indicates  which  direction  to
  1090.           search, and must be either  ffoorrwwaarrdd  or  bbaacckkwwaarrdd.   If
  1091.           omitted,  it defaults to ffoorrwwaarrdd.  _P_a_t_t_e_r_n gives a text
  1092.           string to search for;  if not given, it defaults to the
  1093.           global  variable sseeaarrcchhSSttrriinngg.  If the search subwindow
  1094.           isn't visible, don't do  any  searching  but  open  the
  1095.           search  subwindow  and focus input on the search string
  1096.           entry.  By default, vi-style  regular  expressions  are  |
  1097.           used  for  the pattern and replacement strings.  If the  |
  1098.           variable ``noRegExps'' is set  to  ``1'',  only  simple  |
  1099.           matching  is  done:  there  are no wild cards.  Matches  |
  1100.           must be within a single line of the file.  If  a  match
  1101.           is  found, the matching range is selected and the caret
  1102.           is set to the beginning of the range.  Returns an empty
  1103.           string.
  1104.  
  1105.      sseeee _m_a_r_k [[ttoopp|cceenntteerr|bboottttoomm]
  1106.           Adjust the view in the window so that the character  at
  1107.           _m_a_r_k  is  visible in the window.  If a ttoopp or cceenntteerr or
  1108.           bboottttoomm option is given, then the mark  will  appear  at
  1109.           the  given  position  in the window.  If no position is
  1110.           given, then mmxx will check to see  if  _m_a_r_k  is  already
  1111.           visible.   If  so,  it  does  nothing.  If not, it will
  1112.           center _m_a_r_k in the window.  Returns an empty string.
  1113.  
  1114.      sseelleeccttiioonn _o_p_t_i_o_n [_a_r_g ...]
  1115.           This command performs one of several  selection-related
  1116.           operations, depending on _o_p_t_i_o_n:
  1117.  
  1118.  
  1119.  
  1120.  
  1121. Sprite v.1.0        Printed:  April 19, 1990                   17
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128. MX                        User Commands                        MX
  1129.  
  1130.  
  1131.  
  1132.           sseelleeccttiioonn
  1133.  
  1134.           sseelleeccttiioonn ggeett
  1135.                If sseelleeccttiioonn is invoked  with  no  _o_p_t_i_o_n,  or  if
  1136.                _o_p_t_i_o_n  is  ggeett, then the command returns the con-
  1137.                tents  of  the  selection.   An  error  occurs  if
  1138.                there's  nothing  selected.  The command sseelleeccttiioonn
  1139.                is different from  the  command  _e_x_t_r_a_c_t  _s_e_l._l_e_f_t
  1140.                _s_e_l._r_i_g_h_t:  sseelleeccttiioonn  will return the contents of
  1141.                the selection even if the selection is in  another
  1142.                window,  but  eexxttrraacctt  sseell..lleefftt sseell..rriigghhtt can only
  1143.                return information from this window.
  1144.  
  1145.           sseelleeccttiioonn cclleeaarr
  1146.                If there is something selected in this window, the  |
  1147.                selection is cleared, so nothing will be selected.  |
  1148.                If there is nothing selected in this window, there  |
  1149.                is no effect.  Returns an empty string.
  1150.  
  1151.           sseelleeccttiioonn hheerree
  1152.                Returns 11 if there is something  selected  in  the
  1153.                file  in  this  window.   Returns 00 if there is no
  1154.                selection or if  the  selection  is  not  in  this
  1155.                window's file.
  1156.  
  1157.           sseelleeccttiioonn sseett _m_a_r_k_1 [_m_a_r_k_2]
  1158.                Change the selection to consist of the  characters
  1159.                between  _m_a_r_k_1  and  _m_a_r_k_2,  inclusive.   If _m_a_r_k_2
  1160.                isn't specified, then select the single  character
  1161.                at _m_a_r_k_1.  Returns an empty string.
  1162.  
  1163.      sseenndd _w_i_n_d_o_w _c_o_m_m_a_n_d
  1164.           _W_i_n_d_o_w must be the id of another window owned  by  this
  1165.           mmxx  process  (such  as  a  value placed in nneewwWWiinnddooww by
  1166.           ooppeenn).  The sseenndd command will  invoke  the  Tcl  inter-
  1167.           preter  to  process  _c_o_m_m_a_n_d  in the context of _w_i_n_d_o_w,
  1168.           rather than the window from which the sseenndd command  was
  1169.           issued.   SSeenndd will return the result of executing _c_o_m_-
  1170.           _m_a_n_d in _w_i_n_d_o_w.
  1171.  
  1172.      sswwiittcchh _f_i_l_e_N_a_m_e
  1173.           Change the window to display _f_i_l_e_N_a_m_e instead of what's
  1174.           there  currently.   If the file currently in the window
  1175.           has been modified, and if this is the  only  window  on
  1176.           the file, then a notifier is popped up to warn the user
  1177.           and give him/her a chance to abort the command.
  1178.  
  1179.      ttaaggiinnffoo _n_a_m_e
  1180.           Look up _n_a_m_e in the tags file(s).  If it is found, then
  1181.           return  a Tcl list whose first element is the file con-
  1182.           taining _n_a_m_e and whose second element is a search  pat-
  1183.           tern  identifying  the  tag's location in the file.  If
  1184.  
  1185.  
  1186.  
  1187. Sprite v.1.0        Printed:  April 19, 1990                   18
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194. MX                        User Commands                        MX
  1195.  
  1196.  
  1197.  
  1198.           the global variable ttaaggFFiilleess is defined, it  must  con-
  1199.           tain  a  list of tags files to check.  Those files will
  1200.           be checked for _n_a_m_e in order.  If no ttaaggFFiilleess  variable
  1201.           exists,  then the file ttaaggss in the current directory is
  1202.           searched.
  1203.  
  1204.      uunnddoo [mmoorree]
  1205.  
  1206.      uunnddoo rreeccoovveerr _f_i_l_e_N_a_m_e
  1207.           Undo recent edits.  If  uunnddoo  is  invoked  without  any
  1208.           arguments,  the most recent modification to the file is
  1209.           undone;  multiple invocations will toggle  the  change.
  1210.           If  the  mmoorree argument is given, successive undo's work
  1211.           back through history;  successive  uunnddoo  mmoorree  commands
  1212.           will  undo  every  change  back to the beginning of the
  1213.           edit session.  Modifications are undone in groups  del-
  1214.           imited  by  marks  in an undo log;  normally, a mark is
  1215.           placed in the log before and  after  each  user-invoked
  1216.           action  (button  click,  menu  selection, or keystroke)
  1217.           that modifies the file.  Exceptions to this rule  occur
  1218.           for  keystrokes  whose  bindings have the ``!'' prefix:
  1219.           no marks are placed  in  the  log  for  these  actions.
  1220.           Returns  an  empty  string.   If  the rreeccoovveerr option is
  1221.           given, then _f_i_l_e_N_a_m_e must be the address of a  mmxx  log.
  1222.           This   command  will  read  _f_i_l_e_N_a_m_e,  which  describes
  1223.           changes made in a  previous  edit  session,  and  apply
  1224.           those changes to the current file.
  1225.  
  1226.      uuppddaattee
  1227.           Force the screen to get updated.  Normally  the  screen
  1228.           is  updated  only  at  the end of processing a command,
  1229.           just before waiting for more input from the user.  This
  1230.           command  will  force  any pending redisplays to be per-
  1231.           formed immediately.  It's used  mostly  for  debugging.
  1232.           Returns an empty string.
  1233.  
  1234.      wwrriittee [_f_i_l_e_N_a_m_e]
  1235.           Write the file to disk.  If _f_i_l_e_N_a_m_e is given then  the
  1236.           file  is written there;  otherwise it is written to the
  1237.           place from which it was read (i.e. the  name  displayed
  1238.           in the window's title bar).  Returns a message contain-
  1239.           ing the file's name and number of lines.
  1240.  
  1241.  
  1242. CCOOMMMMAANNDD PPRROOCCEEDDUURREESS
  1243.      In addition to the  built-in  commands  described  above,  a
  1244.      number  of Tcl command procedures are created by the default
  1245.      mmxx startup file.  They may be  invoked  just  like  built-in
  1246.      commands, and are described below.
  1247.  
  1248.      ccaarreettiinnffoo
  1249.           Returns  a  string  containing  information  about  the
  1250.  
  1251.  
  1252.  
  1253. Sprite v.1.0        Printed:  April 19, 1990                   19
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260. MX                        User Commands                        MX
  1261.  
  1262.  
  1263.  
  1264.           file's length and the position of the caret.
  1265.  
  1266.      lliinnee _i
  1267.           Selects line number _i and adjusts the view in the  win-
  1268.           dow  so  that  the  line number is visible.  Returns an
  1269.           empty string.
  1270.  
  1271.      mmoovvee This command moves the contents of the selection to the
  1272.           caret position.  Returns an empty string.
  1273.  
  1274.      nneexxtt This command switches to the next _f_i_l_e of those  speci-  |
  1275.           fied  on the command line by deleting the first element  |
  1276.           of the variable $$ffiilleess and switching the window to  the  |
  1277.           new first element of $$ffiilleess.
  1278.  
  1279.      sshhoowwBBiinnddiinnggss _b_i_n_d_i_n_g _b_i_n_d_i_n_g ...
  1280.           Open a scratch window  and  display  information  about
  1281.           keystroke  bindings  in  it.  If no _b_i_n_d_i_n_g argument is
  1282.           given, then display information about all of the  keys-
  1283.           troke  bindings  that are currently defined.  If one or
  1284.           more _b_i_n_d_i_n_g arguments are  given,  then  just  display
  1285.           information  for  the given bindings.  Returns an empty
  1286.           string.
  1287.  
  1288.      sshhoowwMMeennuuss _n_a_m_e _n_a_m_e ...
  1289.           Open a scratch window  and  display  information  about
  1290.           menus  in  it.   If  no  _n_a_m_e  argument  is given, then
  1291.           display  information  for  all  the  menus   that   are
  1292.           currently  defined.   If one or more _n_a_m_e arguments are
  1293.           given, then just  display  information  for  the  named
  1294.           menus.  Returns an empty string.
  1295.  
  1296.      sshhoowwPPrrooccss _n_a_m_e _n_a_m_e ...
  1297.           Open a scratch window and display procedure information
  1298.           in  it.   If  no  _n_a_m_e  argument is given, then display
  1299.           information about all the procedures that are currently
  1300.           defined.  If one or more _n_a_m_e arguments are given, then
  1301.           just display  information  for  the  named  procedures.
  1302.           Returns an empty string.
  1303.  
  1304.      sshhoowwVVaarrss _n_a_m_e _n_a_m_e ...
  1305.           Open a scratch window and display  variable  values  in  |
  1306.           it.   If  no  _n_a_m_e  argument is given, then display the  |
  1307.           values of all variables known in  the  context  of  the  |
  1308.           caller  of sshhoowwVVaarrss.  If one or more _n_a_m_e arguments are  |
  1309.           given, then just show the values  of  those  variables.  |
  1310.           Returns an empty string.
  1311.  
  1312.      ttaagg _n_a_m_e
  1313.           Invoke the ttaaggiinnffoo command to look up _n_a_m_e, then open a
  1314.           new  window on its file, select the definition of _n_a_m_e,
  1315.           and make the selected line visible in the  new  window.
  1316.  
  1317.  
  1318.  
  1319. Sprite v.1.0        Printed:  April 19, 1990                   20
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326. MX                        User Commands                        MX
  1327.  
  1328.  
  1329.  
  1330.           Returns an empty string.
  1331.  
  1332.      wwhheerree
  1333.           Open a scratch window  and  display  information  about  |
  1334.           where  the  last error occurred.  The error information  |
  1335.           is taken from the eerrrroorrIInnffoo global variable.
  1336.  
  1337.  
  1338. CCOOMMMMAANNDD SSUUBBWWIINNDDOOWW
  1339.      The  command  subwindow  allows  commands  to  be  typed  in
  1340.      directly,  instead  of invoking them through keystroke bind-
  1341.      ings or menus.  When active, it appears at the bottom of the
  1342.      mmxx  window.   It  can be activated with the ccoommmmaanndd or ffooccuuss
  1343.      commands.  Commands may be entered and edited in the command
  1344.      subwindow,  and  are invoked by typing carriage-return or by
  1345.      middle-clicking in the window.  When a command  is  invoked,
  1346.      it  is  not  deleted from the command subwindow, in order to
  1347.      permit it to be re-invoked easily.  The  command  window  is
  1348.      de-activated by typing ^^QQ in it.
  1349.  
  1350.  
  1351. SSEEAARRCCHH SSUUBBWWIINNDDOOWW
  1352.      The search subwindow is used to enter search and replacement
  1353.      strings.   When active, it appears at the top of the mmxx win-
  1354.      dow, just underneath the menu bar.  If it isn't active and a
  1355.      search  or  replacement command is invoked that requires one
  1356.      of its entries, then the window is activated.  It  may  also
  1357.      be  activated using the ffooccuuss command.  The top entry in the
  1358.      window is used to enter a  search  pattern  and  the  bottom
  1359.      entry  is used to enter a replacement string.  The values of
  1360.      these two entries are always available in  the  sseeaarrcchhSSttrriinngg
  1361.      and   rreeppllaacceeSSttrriinngg   global  variables,  respectively.   If
  1362.      carriage-return is typed in the ``Search:'' entry, or if the
  1363.      middle  mouse  button  is clicked in the entry, then the the
  1364.      contents of the global variable sseeaarrcchhCCmmdd are invoked  as  a
  1365.      Tcl   command.    If   carriage-return   is   typed  in  the
  1366.      ``Replace:'' entry, or if it is  middle-buttoned,  then  the
  1367.      contents  of the global variable rreeppllaacceeCCmmdd are invoked as a
  1368.      Tcl command.  The search subwindow  can  be  deactivated  by
  1369.      typing ^^QQ in it.
  1370.  
  1371.  
  1372. KKEEYYWWOORRDDSS
  1373.      editor, mouse, window
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385. Sprite v.1.0        Printed:  April 19, 1990                   21
  1386.  
  1387.  
  1388.  
  1389.